import { defineStore } from 'pinia'

export const useBreadcrumbStore = defineStore('breadcrumb', {
  state: () => ({
    /** @type {{ text: string, id: number, isFinished: boolean }[]} */
    breadcrumbitems: {
      role: ['系统管理', '角色管理'],
      sysnode: ['系统管理', '系统功能']
    },
    path: 'role'
  }),
  getters: {
    filteredItem(state) {
      return state.breadcrumbitems[state.path]
    }
  },
  actions: {}
})
